---
title: Print rendered bytes
summary: Sends already-rendered document bytes to a physical printer through the xPression Design service.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-09-01
library: SAIF.Services.Printing
reference_type: embedded
operation_id: op-03-print-rendered-bytes
trigger: clsPrint.printPDF invoked
---

# Print rendered bytes

Sends an already-rendered byte array to a physical printer via the xPression Design service, using the current instance-level printer, plex mode, copy count, and scale mode settings.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-03 |
| **Trigger** | `clsPrint.printPDF` invoked |
| **Inputs** | `inFile As Byte()`, plus instance state `Printer`, `PlexMode`, `Copies`, `ScaleMode` |
| **Outputs** | `True` (unconditional) |
| **Primary components** | `clsPrint.printPDF`, `m_Xpresso.printPDF` |
| **Entry point** | `SAIF.Services.Printing/clsPrint.vb` |

## Steps

1. Calls `m_Xpresso.printPDF(inFile, m_Printer, m_Plexmode, m_Copies, m_Scalemode)` against the xPression web service, passing the already-rendered bytes together with the current printer, plex mode, copy count, and scale mode state.
   - There is no validation of `inFile` before the call — a `Nothing` or empty byte array is passed through as-is.
2. Returns `True` unconditionally regardless of what the web service call actually did ([BR-PRT-013](../business-rules.md#br-prt-013-print-and-distribute-report-unconditional-success)).
   - On failure: the web service call can still throw; if it does, the exception propagates and the `True` return is never reached — the unconditional `True` only covers the case where the call completed without throwing.

## Process flow

```mermaid
flowchart TD
	Start(["printPDF invoked"]) --> Call["m_Xpresso.printPDF<br>(bytes, printer, plex, copies, scale)"]
	Call -->|"No exception"| End(["Return True"])
	Call -->|"Exception"| Err(["Exception propagates<br>(True never reached)"])
```

## Failure and edge-case behavior
- [BR-PRT-013](../business-rules.md#br-prt-013-print-and-distribute-report-unconditional-success) is central to this operation: a caller cannot distinguish "printed successfully" from "silently no-op'd" via the return value alone — only a thrown exception signals failure.
- No validation of `inFile` occurs before the call to `m_Xpresso.printPDF`.

## Related documentation
- [Index](../index.md)
- [Overview](../overview.md)
- [Architecture](../architecture.md)
- [Dependencies](../dependencies.md)
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Configuration](../configuration.md)
- [API reference](../api/index.md)

## Sources
- `SAIF.Services.Printing/clsPrint.vb`
